<?php
//测试控制器类
class IndexController extends Controller{
    //动作方法
    public function index(){
        //SQL select from where group having  order limit
        $db = M('blog');
//        $data = $db->field("count(*) as c ,cid")->group("cid")->all();
        $data = $db->field("cid")->group("cid")->having("count(*) >21")->all();
        //SELECT cid FROM blog GROUP BY cid HAVING count(*) >21
        p($data);

    }
}
